package com.example.test.service.impl;

import com.example.test.dao.IUserDao;
import com.example.test.entity.User;
import com.example.test.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService implements IUserService {
    @Autowired
    private IUserDao iLoginDao;

    @Override
    public User login(String username, String password) {
        return iLoginDao.login(username, password);
    }

    @Override
    public void insert(String username, String password) {
        iLoginDao.insert(username, password);
    }

    @Override
    public void update(String username, String password) {
        iLoginDao.update(username, password);
    }

    @Override
    public List<User> check(String username) {
        return iLoginDao.check(username);
    }
}
